home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / c_count-.0 / c_count- / c_count-7.0 / makefile.in < prev    next >
Encoding:
Makefile  |  1995-05-14  |  3.2 KB  |  136 lines

  1. # $Id: makefile.in,v 7.3 1995/05/14 21:42:55 tom Exp $
  2. # Makefile-template for 'c_count'
  3.  
  4. THIS = c_count
  5. RELEASE = 7
  6.  
  7. #### Start of system configuration section. ####
  8.  
  9. @SET_MAKE@
  10. srcdir = @srcdir@
  11. VPATH  = @srcdir@
  12.  
  13. CC        = @CC@
  14. LINK        = $(CC)
  15. INSTALL        = @INSTALL@
  16. INSTALL_PROGRAM    = @INSTALL_PROGRAM@
  17. INSTALL_DATA    = @INSTALL_DATA@
  18.  
  19. LIBS        = @LIBS@
  20. CFLAGS        = @CFLAGS@
  21. LDFLAGS        =
  22.  
  23. prefix        = @prefix@
  24. exec_prefix    = @exec_prefix@
  25.  
  26. bindir        = $(exec_prefix)/bin
  27. libdir        = $(exec_prefix)/lib
  28. mandir        = $(prefix)/man/man1
  29. manext        = 1
  30.  
  31. #### End of system configuration section. ####
  32.  
  33. SHELL        = /bin/sh
  34.  
  35. CPPFLAGS    = -I. -I$(srcdir) -DHAVE_CONFIG_H
  36.  
  37. LDFLAGS        = 
  38.  
  39. .c.o:
  40.     $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
  41.  
  42. SRC = CHANGES patchlev.h \
  43.     README $(THIS).c $(THIS).1 \
  44.     config_h.in install.sh mkdirs.sh makefile.in configure.in
  45.  
  46. OBJ = $(THIS).o
  47.  
  48. DISTFILES = configure $(SRC)
  49.  
  50. all:    $(THIS)
  51.  
  52. $(THIS): $(OBJ)
  53.     -mv $(THIS) o$(THIS)
  54.     $(LINK) $(LDFLAGS) -o $(THIS) $(OBJ) $(LIBS)
  55.  
  56. install: all installdirs
  57.     $(INSTALL_PROGRAM) $(THIS) $(bindir)/$(THIS)
  58.     $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(THIS).$(manext)
  59.  
  60. installdirs:
  61.     $(SHELL) ${srcdir}/mkdirs.sh $(bindir) $(libdir) $(mandir)
  62.  
  63. uninstall:
  64.     rm -f $(bindir)/$(THIS) $(mandir)/$(THIS).$(manext)
  65.  
  66. makefile: makefile.in config.status
  67.     ./config.status
  68.  
  69. config.h: configure
  70.     ./configure
  71.  
  72. config.status: configure
  73.     ./config.status --recheck
  74.  
  75. mostlyclean:
  76.     - rm -f *.o o$(THIS) core *~ *.BAK
  77.     - rm -f Part?? part.*
  78.  
  79. clean: mostlyclean
  80.     - rm -f $(THIS)
  81.  
  82. distclean: clean
  83.     - rm -f makefile config.log config.cache config.status config.h
  84.  
  85. realclean: distclean
  86.     - rm -f tags TAGS # don't remove configure!
  87.  
  88. check: $(THIS)
  89.     cd testing; $(MAKE) run_test
  90.  
  91. lint:
  92.     lint $(THIS).c
  93.  
  94. tags:
  95.     ctags $(THIS).c $(HDRS)
  96.  
  97. TAGS:
  98.     etags $(THIS).c $(HDRS)
  99.  
  100. # I keep my sources in RCS, and assign a symbolic release to the current patch
  101. # level.  The 'manifest' script knows how to build a list of files for a given
  102. # revision.
  103. MANIFEST: patchlev.h
  104.     manifest -rv$(RELEASE)`fgrep PATCHLEVEL patchlev.h | sed -e s'/^[^0-9]*/_/'` \
  105.         testing/case*.dcl testing/case*.bat
  106.  
  107. dist: MANIFEST
  108.     - rm -f .fname .files
  109.     fgrep PATCHLEVEL patchlev.h | sed -e 's/[^0-9.]//g' -e 's/^/$(THIS)-$(RELEASE)./' >.fname
  110.     cat MANIFEST | grep ' ' | egrep -v ' subdirectory$$' | sed -e 's/\ .*//' | uniq >.files
  111.     rm -rf `cat .fname`
  112.     TOP=`cat .fname`; mkdir $$TOP `cat .files | grep / | sed -e 's@/.*@@' | sed -e s@\^@$$TOP/@ | uniq`
  113.     for file in `cat .files`; do \
  114.       ln $(srcdir)/$$file `cat .fname`/$$file \
  115.         || { echo copying $$file instead; cp $$file `cat .fname`/$$file; }; \
  116.     done
  117.     tar -cf - `cat .fname` | gzip >`cat .fname`.tgz
  118.     rm -rf `cat .fname` .fname .files
  119.  
  120. # Some of the output will be uuencoded because the test scripts include
  121. # <CR><LF> terminated ".bat" files for MS-DOS.
  122. dist-shar: MANIFEST
  123.     - rm -f .fname .files
  124.     fgrep PATCHLEVEL patchlev.h | sed -e 's/[^0-9.]//g' -e 's/^/$(THIS)-$(RELEASE)./' >.fname
  125.     cat MANIFEST | grep ' ' | egrep -v ' subdirectory$$' | sed -e 's/\ .*//' | uniq >.files
  126.     shar -M -n`cat .fname` -opart -l50 `cat .files`
  127.     - rm -f .fname .files
  128.  
  129. # This uses Rick Salz's cshar to make a set of shar-files.
  130. # (It'll clobber the version info in MANIFEST, and doesn't restore timestamps,
  131. # but that's another bag of worms).
  132. dist-cshar: MANIFEST
  133.     makekit -m
  134.  
  135. $(THIS).o:    config.h
  136.